<?php

namespace App\Services\FourElement\Drivers;

use App\Services\FourElement\FourElementVerificationResult;
use App\Services\FourElement\FourElementVerifier;
use Psr\Log\LoggerInterface;

class LogFourElementVerifier implements FourElementVerifier
{
    protected LoggerInterface $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function verify(string $name, string $phone, string $idCard, string $bankAccount): FourElementVerificationResult
    {
        $this->logger->info('[FourElement] Using log driver for verification', [
            'name' => $name,
            'phone' => $phone,
            'id_card' => $idCard,
            'bank_account' => $bankAccount,
        ]);

        return FourElementVerificationResult::passed('已记录四要素验证请求（日志驱动）');
    }
}
